package com.vids.model.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *  通知表
 * </p>
 *
 * @author ly
 */
@TableName("t_notification")
public class Notification extends Model<Notification> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonIgnore
    private Integer id;
    /**
     * 通知标识
     */
    @TableField("notification_id")
    private String NotificationID;
    /**
     * 订阅标识
     */
    @TableField("subscribe_id")
    private String SubscribeID;
    /**
     * 订阅标题
     */
    private String title;
    /**
     * 触发时间
     */
    @TableField("trigger_time")
    @DateTimeFormat(pattern = "yyyyMMddHHmmss")
    private String triggerTime;
    /**
     * 订阅通知的详细信息(人、车、物、场景)标识集合
     */
    @TableField("info_ids")
    private String InfoIDs;



    @TableField(exist = false)
    @JsonIgnore
    private List<Person> persons;

    @TableField(exist = false)
    @JsonIgnore
    private List<Face> faces;
    @TableField(exist = false)
    @JsonIgnore
    private List<MotorVehicle> motorVehicles;


    public Integer getId() {
	return id;
    }

    public void setId(Integer id) {
	this.id = id;
    }
    @JsonProperty(value = "Title")
    public String getTitle() {
	return title;
    }

    public void setTitle(String title) {
	this.title = title;
    }

    @JsonProperty(value = "TriggerTime")
    public String getTriggerTime() {
	return triggerTime;
    }

    public void setTriggerTime(String triggerTime) {
	this.triggerTime = triggerTime;
    }

    @Override
    public Serializable pkVal() {
	return this.id;
    }
    @JsonProperty(value = "NotificationID")
    public String getNotificationID() {
	return NotificationID;
    }

    public void setNotificationID(String notificationID) {
	NotificationID = notificationID;
    }

    @JsonProperty(value = "SubscribeID")
    public String getSubscribeID() {
	return SubscribeID;
    }

    public void setSubscribeID(String subscribeID) {
	SubscribeID = subscribeID;
    }
    @JsonProperty(value = "InfoIDs")
    public String getInfoIDs() {
	return InfoIDs;
    }

    public void setInfoIDs(String infoIDs) {
	InfoIDs = infoIDs;
    }

    @Override
    public String toString() {
	return "TNotification{" + ", id=" + id + ", notificationId=" + NotificationID + ", subscribeId=" + SubscribeID
		+ ", title=" + title + ", triggerTime=" + triggerTime + ", infoIds=" + InfoIDs + "}";
    }
}
